package cn.memorynine.consumer.controller;

import cn.memorynine.consumer.model.forum.manage.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import cn.memorynine.common.model.ResponseWrapper;
import cn.memorynine.consumer.service.ForumManageService;
import cn.memorynine.common.model.ResponseWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RequestBody;

/**
* 管理后台-论坛管理控制器
* @author 代码生成器
*/
@Slf4j
@RestController
@RequestMapping("/admin/ForumManage")
public class ForumManageController {
    @Autowired
    private ForumManageService ForumManageService;

    /**
     * 1.获取所有帖子列表
     * @return
     */
    @RequestMapping("/postList")
    public ResponseWrapper postList(@RequestBody @Validated PostListParam param){
        return ForumManageService.postList(param);
    }

    /**
     * 2.删除帖子
     * @return
     */
    @RequestMapping("/delPost")
    public ResponseWrapper delPost(@RequestBody @Validated DelPostParam param){
        return ForumManageService.delPost(param);
    }

    /**
     * 3.获取所有特定帖子回复列表
     * @return
     */
    @RequestMapping("/replyList")
    public ResponseWrapper replyList(@RequestBody @Validated ReplyListParam param){
        return ForumManageService.replyList(param);
    }

    /**
     * 4.删除回复
     * @return
     */
    @RequestMapping("/delReply")
    public ResponseWrapper delReply(@RequestBody @Validated DelReplyParam param){
        return ForumManageService.delReply(param);
    }

}